package com.loan.common.enums;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;

/**
 * @author shiguang on 2022/9/16 17:00
 */
public enum SmsCompanyType {

    /**
     * 验证码
     */
    TYH("tyh","天一泓"),

    /**
     * 待提现
     */
    NX("nx","牛信"),
    ;

    private final String code;
    private final String info;

    SmsCompanyType(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static List<HashMap<String, String>> getList() {
        List<HashMap<String, String>> list = new ArrayList<>();
        for (SmsCompanyType smsCompanyType : EnumSet.allOf(SmsCompanyType.class)) {
            HashMap<String, String> map = new HashMap<>();
            map.put("code", smsCompanyType.code);
            map.put("name", smsCompanyType.info);
            list.add(map);
        }
        return list;
    }
}
